package com.alangyun.remind.vo.leader;

import java.io.Serializable;

public class LeaderSum implements Serializable {

	/** 统计项 * */
	private String name;
	/** 数量 * */
	private Integer count;
	/** 占比 * */
	private String percent;
	
	public static LeaderSum create(String name, int count, int total) {
		LeaderSum ret= new LeaderSum();
		ret.name =name;
		ret.count=0;
		ret.percent="";
		if(total>0) {
			ret.count = count;
			ret.percent = String.format("%.2f%%", count * 100.0/total);
		}
		return ret;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	public String getPercent() {
		return percent;
	}

	public void setPercent(String percent) {
		this.percent = percent;
	}

}
